package com.beikai.elasticsearch_demo.task;/**
 * Created with IntelliJ IDEA.
 * User: beikai
 * Date: 2020/1/9
 * Time: 10:43
 * Description:
 */

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @ClassName:
 * @Description:
 * @author hbk
 * @date 2020/1/9 10:43
 */
//@Component
public class XxlJobDemo {
    private static Logger logger = LoggerFactory.getLogger(XxlJobDemo.class);

    /**
     * 1、简单任务示例（Bean模式）
     */
    @XxlJob("demoJobHandler")
    public ReturnT<String> demoJobHandler(String param) throws Exception {
        System.out.println("---------------------------执行开始了---------------------------");
        System.out.println("---------------------------执行结束了---------------------------");
        return ReturnT.SUCCESS;
    }
}
